package com.example.security_demo.controller;

import com.example.security_demo.pojo.User;
import com.example.security_demo.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

@Controller
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserService userService;

    @PostMapping("/login")
    public String login(@RequestBody User user) {
        //System.out.println(user.toString());
        //User byUsername = userService.findByUsername(user);
        //return "redirect:/success";
        return "success";
    }
}
